#include "pwm.h"
#include "delay.h"
#include "xpt2046.h"
#include "lcd1602.h"
#include "uart.h"

extern char duty;
extern unsigned char rec_data;

char step = 1;

void main() 
{
	unsigned int adc = 0;
	char str[2] = {'0','0'}; 
	LCD_Init();
	Uart_Init();
	pwm_init();
	duty = 0;
	while(1) 
	{
		duty = rec_data;
		//duty = read_xpt2046()/150;
		str[0] = (duty / 10) + 0x30;
		str[1] = (duty % 10) + 0x30;
		LCD_Display(&str, 1, 0, 2);
	}
}